#if($msg)
<script>
alert('$!msg');
</script>
#end
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>账单管理</title>
<link href="/include/manage/images/main/style.css" rel="stylesheet" type="text/css" />
<link href="/include/manage/dialog/asyncbox.css" type="text/css" rel="stylesheet" />
<style type="text/css">
.textInput {
	width:180px;
	height:18px;
}
</style>
<script type="text/javascript" src="/include/manage/js/datepicker.js"></script>
<script type="text/javascript" src="/include/manage/js/jquery.js"></script>
<script type="text/javascript" src="/include/manage/js/AsyncBox.js"></script>
<script language="javascript">
jQuery.ajaxSetup ({  
	cache: false
});

jQuery(function(){
	jQuery('#chooseSUser').click(function(){
		asyncbox.open({
			title : '选择供应商',
			url : '/manage_supplier_ajax.ad?parameter=showList&checkStyle=radio',
			width : 400,
			height : 300,
			tipsbar:{
				title : '选择供应商',
				content : '请选择账单所属的供应商'
				},
				btnsbar : jQuery.btn.OKCANCEL,
				callback : function(action,iframe){
					if(action == 'ok'){
						var str='';
						var sname='';
						$("input[name='sel_supplier']:checked",iframe.document.body).each(function(){
							if(this){
								str=$(this).val();
								//alert('aaaaaaa'+this.id);
								sname=iframe.document.getElementById("s_"+this.id).innerText;
							}
						});
						$("#suser").val(str);
						$("#sname").val(sname);
		　　		}
				}
		});
	});
});
</script>
</head>
<body>
<form name="writeform" method="post" action="/manage_bill.ad" enctype="multipart/form-data">
	<input type="hidden" name="parameter" value="$!action" />
	<input type="hidden" name="id" value="$!bill.id" />
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td height="30" background="/include/manage/images/main/tab_05.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td width="12" height="30"><img src="/include/manage/images/main/tab_03.gif" width="12" height="30" /></td>
						<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td width="46%" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td width="5%"><div align="center"><img src="/include/manage/images/main/tb.gif" width="16" height="16" /></div></td>
												<td width="95%"><span class="STYLE3">当前位置</span>：[交易管理]-[账单管理]</td>
											</tr>
										</table></td>
									<td width="54%"></td>
								</tr>
							</table></td>
						<td width="16"><img src="/include/manage/images/main/tab_07.gif" width="16" height="30" /></td>
					</tr>
				</table></td>
		</tr>
		<tr>
			<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td width="8" background="/include/manage/images/main/tab_12.gif">&nbsp;</td>
						<td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#b5d6e6">
								<tr>
									<td width="20%" height="25" bgcolor="#ffffff">&nbsp;供 应 商：</td>
									<td width="50%" bgcolor="#ffffff">&nbsp;<input type="hidden" id="suser" name="suser" value="$!bill.suser" />
										<input id="sname" class="textInput" name="sname" type="text" value="$!bill.getSname()" />
										<input type="button" id="chooseSUser" name="chooseSUser" value="选择供应商"/>
										</td>
									<td bgcolor="#ffffff"></td>
								</tr>
								<tr>
									<td height="25" bgcolor="#ffffff">&nbsp;账单内容：</td>
									<td bgcolor="#ffffff">&nbsp;<input type="hidden" id="file" name="file" value="$!bill.file" />
										#if($bill.file)
										<a href="$!bill.file" title="预览">$!bill.file <img src="/include/manage/images/main/images.gif" align="absmiddle"/></a>
										<a href="/manage_bill.ad?parameter=removeFile&id=$!bill.id" title="删除"><img src="/include/manage/images/main/del.gif" width="16" height="16" align="absmiddle" /></a>
										#else
										<input class="textInput" name="upfile" type="file" />
										#end
									</td>
									<td bgcolor="#ffffff"></td>
								</tr>
								<tr>
									<td height="25" bgcolor="#ffffff">&nbsp;账单日期：</td>
									<td bgcolor="#ffffff">&nbsp;
										<input class="textInput" name="date" id="date" type="text" value="$!bill.date" onFocus="HS_setDate(this)" /></td>
									<td bgcolor="#ffffff"></td>
								</tr>
								<tr>
									<td height="25" colspan="3" bgcolor="#ffffff"></td>
								</tr>
							</table></td>
						<td width="8" background="/include/manage/images/main/tab_15.gif">&nbsp;</td>
					</tr>
				</table></td>
		</tr>
		<tr>
			<td height="35" background="/include/manage/images/main/tab_19.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td width="12" height="35"><img src="/include/manage/images/main/tab_18.gif" width="12" height="35" /></td>
						<td valign="top"><div align="center">
								<input type="submit" name="Submit" value="保存" />
								&nbsp; &nbsp;
								<input type="reset" name="Reset" value="重写" />
							</div></td>
						<td width="16"><img src="/include/manage/images/main/tab_20.gif" width="16" height="35" /></td>
					</tr>
				</table></td>
		</tr>
	</table>
</form>
</body>
</html>